<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition 
    xmlns:ui="http://java.sun.com/jsf/facelets"
    template="/templates/common/template.xhtml"      
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <ui:define name="left">
        <ui:include src="menuacordion.xhtml" /> 
    </ui:define>
    <h:head>

    </h:head> 

    <ui:define name="content">
        <h:body >
            <a4j:log mode="console" level="DEBUG"/>
        <ui:debug hotkey="0" />
        <a4j:status onstart="#{rich:component('statPane')}.show()" onstop="#{rich:component('statPane')}.hide()" />
            <h1>Registro Alumno Modo Beta</h1>
            <h:form prependId="false"> 
                <rich:tabPanel id="idTabcurso" switchType="client" > 
                    <rich:tab header="Datos Generales">
                        <h:panelGrid columns="6">

                            <h:outputText value="Código Prosefor:"  />
                            <h:inputText value="#{profesorBean.codProf}" id="codigo" label="codigo"/>

                            <h:outputText value="Descripcion:" />
                            <h:inputText value="#{profesorBean.nombres}" />

                            <h:outputText value="Area:" />
                            <h:inputText value="#{profesorBean.apePaterno}" />

                            <h:outputText value="Nivel:" />
                            <h:inputText value="#{profesorBean.apeMaterno}" />

                        </h:panelGrid> 
                    </rich:tab>


                    <rich:panel id="sample1" styleClass="tooltip-text" bodyClass="rich-laguna-panel-no-header">

                        <h:commandButton id="btnNuevo" 
                                         value="Nuevo"/>

                        <h:commandButton id="btnEditar" 
                                         value="Editar"/>

                        <h:commandButton id="btnGrabar" 
                                         value="Grabar"/>

                        <a4j:commandButton value="Buscar" styleClass="no-decor" render="editGrid" execute="@this"
                                   oncomplete="#{rich:component('editPane')}.show()"> 
                           
                          
                  </a4j:commandButton>
                        
                    </rich:panel>
                </rich:tabPanel>
            </h:form> 
            
            <rich:popupPanel id="statPane" autosized="true">
            <h:graphicImage value="./images/ai.gif" alt="ai" />
            Procesando...
           </rich:popupPanel>

            <rich:popupPanel id="editPane"  header="Buscar Profesor" 
                             domElementAttachment="parent" width="450" height="400">
                <f:facet name="controls">
                    <h:outputLink value="#" onclick="#{rich:component('popup')}.hide();
                                                 return false;">X</h:outputLink>
                </f:facet>
                <h:panelGrid columns="1" id="editGrid">
                    <rich:dataTable value="#{profesorBean.lisProfesor}" 
                                    var="pro" 
                                    iterationStatusVar="it" 
                                    id="table" 
                                    rows="15">
                        <rich:column>
                            <f:facet name="header">Vendor</f:facet>
                            <h:outputText value="#{pro.idProfesor}" />
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">Model</f:facet>
                            <h:outputText value="#{pro.nombre}" />
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">Price</f:facet>
                            <h:outputText value="#{pro.apellidoMat}" />
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">Mileage</f:facet>
                            <h:outputText value="#{pro.apellidoPat}" />
                        </rich:column>
                        <rich:column>
                            <f:facet name="header">VIN</f:facet>
                            <h:outputText value="#{pro.nombre}" />
                        </rich:column>
                        </rich:dataTable>
                </h:panelGrid>:
            </rich:popupPanel>

        </h:body>
    </ui:define>
</ui:composition>
